package com.example.home.tool;

import android.app.Activity;
import android.util.Log;

public class RunOnUiThreadTool {
    public static void run(Activity activity, RunCallback run){
        activity.runOnUiThread(new Runnable() {
            @Override
            public void run() {
                try{
                    run.set();
                }catch(Exception e){
                    Log.v("OKHttpTool","Excetion occur on run;");
                    Log.v("OKHttpTool",e.getMessage());
                }
            }
        });
}
public interface RunCallback {
    void set();
}

    }
